CT-scan algorithm